/*
 * This file is part of b.AMP.
 *
 * b.AMP is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * b.AMP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with b.AMP.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __BAMP_ADDON_HPP__
#define __BAMP_ADDON_HPP__

#include <boost/filesystem.hpp>
#include <string>
#include <vector>

namespace bamp
{

    /**
     * An add-on is a collection of plugins and extensions. An add-on
     * descriptor file must be present and indicates which
     * plugins/extensions are contained.
     */
    struct Addon
    {
        struct Extension
        {
            boost::filesystem::path exec;    /// Path of the executable
            std::vector<std::string> args;   /// Command-line arguments
        };

        // Add-on descriptor loading
        void load(const boost::filesystem::path& dir);
        void reset();

        // Add-on descriptor contents
        std::vector<boost::filesystem::path> plugins;
        std::vector<Extension> extensions;
    };

} // namespace bamp

#endif // __BAMP_ADDON_HPP__
